<!--
 * @Descripttion: 特殊单字符
 * @Author: YuZhenJing
 * @Date: 2020-07-01 19:56:56
 * @LastEditors: YuZhenJing
 * @LastEditTime: 2020-07-01 20:21:31
-->
<!DOCTYPE html>
<html lang="zh_CN">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>特殊单字符</title>
  </head>
  <body>
    <script>
      let title_style = "font-weight: bold;color:red;";
      let test_style = "padding-left:20px;color:yellow;";
      let text = ". 任意字符（换行除外）:anyun 666";
      console.log("%c特殊单字符介绍：", title_style);
      console.log("%c任意字符（换行除外）[.]:", test_style, text.match(/.+/));
      text = "任意数字:anyun666";
      console.log("%c任意数字[\\d]:", test_style, text.match(/\d+/));
      text = "任意字母、数字、下划线 :anyun666";
      console.log(
        "%c任意字母、数字、下划线[\\w]:",
        test_style,
        text.match(/\w+/)
      );
      text = `
            任意空白符   
      `;
      console.log("%c任意空白符[\\s]:", test_style, text.match(/\s+/));
    </script>
  </body>
</html>
